// app/ClientMessage.tsx
'use client' // 标记为客户端组件

import { message } from 'antd'
import { FC, useEffect } from 'react'

interface ClientMessageProps {
  triggerMessage: boolean
}

const ClientMessage: FC<ClientMessageProps> = ({ triggerMessage }) => {
  useEffect(() => {
    if (triggerMessage) {
      message.success('This is a success message')
    }
  }, [triggerMessage])

  return null // 不需要渲染任何内容
}

export default ClientMessage
